<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = this.getServletContext().getContextPath();
%>
<div class="sidebar" id="sidebar">
	<script type="text/javascript">
		try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
	</script>
	<ul class="nav nav-list">
		<c:if test="${not empty sessionScope.session_menu }">
			<c:forEach items="${sessionScope.session_menu }" var="menu" varStatus="vs">
				<c:if test="${menu.single==0 }">
					<c:choose>
						<c:when test="${menu.url == sessionScope.url}">
							<li class="open">
						</c:when>
						<c:otherwise>
							<li>
						</c:otherwise>
					</c:choose>
						<a href="#" class="dropdown-toggle">
							<i class="icon-edit"></i>
							<span class="menu-text"> ${menu.title } </span>
							<b class="arrow icon-angle-down"></b>
						</a>
						<ul class="submenu" style="<c:if test="${menu.url == sessionScope.url }">display:block;</c:if>">
							<c:forEach items="${sessionScope.session_menu }" var="submenu">
								<c:if test="${submenu.pid==menu.id }">
									<li>
										<a href="<%=path %>${submenu.url }">
											<i class="icon-double-angle-right"></i>
											${submenu.title }
										</a>
									</li>
								</c:if>
							</c:forEach>
						</ul>
						</li>
					
				</c:if>								
			</c:forEach>
		</c:if>
	</ul>
	<!-- /.nav-list -->

	<div class="sidebar-collapse" id="sidebar-collapse">
		<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
	</div>

	<script type="text/javascript">
		try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
	</script>
</div>